﻿using System;
using ComplexNumberLibrary;
using ComplexNumberPresentation;

namespace ComplexNumberTest
{
    class MockView : IView
    {
        public ComplexNumber Result { set; get; }

        public double CurrentReal { set; get; }
        public double CurrentImaginary { set; get; }

        public Operation CurrentOperation { set; get; }
        public bool ImaginaryFocused { set; get; }
        public String ImaginaryText { set; get; }

        public bool LogVisible { set; get; }
        public String LogText { set; get; }

        public int LoggerIndex { set; get; }

        public event Action OnClearClick;
        public event Action OnAllClearClick;
        public event Action OnOneClick;
        public event Action OnTwoClick;
        public event Action OnThreeClick;
        public event Action OnFourClick;
        public event Action OnFiveClick;
        public event Action OnSixClick;
        public event Action OnSevenClick;
        public event Action OnEightClick;
        public event Action OnNineClick;
        public event Action OnZeroClick;
        public event Action OnImaginaryClick;
        public event Action OnResultClick;
        public event Action OnAddClick;
        public event Action OnSubtractClick;
        public event Action OnMultiplyClick;
        public event Action OnDivideClick;
        public event Action OnModulusClick;
        public event Action OnShowLogClick;
        public event Action<int> OnChooseLogClick;
        public event Action OnSaveToFileClick;

        public void AllClearClick()
        {
            OnAllClearClick();
        }

        public void ClearClick()
        {
            OnClearClick();
        }


        public void AddClick()
        {
            OnAddClick();
        }

        public void SubtractClick()
        {
            OnSubtractClick();
        }

        public void MultiplyClick()
        {
            OnMultiplyClick();
        }

        public void DivideClick()
        {
            OnDivideClick();
        }

        public void ModulusClick()
        {
            OnModulusClick();
        }

        public void OneClick()
        {
            OnOneClick();
        }

        public void TwoClick()
        {
            OnTwoClick();
        }

        public void ThreeClick()
        {
            OnThreeClick();
        }

        public void FourClick()
        {
            OnFourClick();
        }

        public void FiveClick()
        {
            OnFiveClick();
        }

        public void SixClick()
        {
            OnSixClick();
        }

        public void SevenClick()
        {
            OnSevenClick();
        }

        public void EightClick()
        {
            OnEightClick();
        }

        public void NineClick()
        {
            OnNineClick();
        }

        public void ZeroClick()
        {
            OnZeroClick();
        }

        public void ImageClick()
        {
            OnImaginaryClick();
        }

        public void ResultClick()
        {
            OnResultClick();
        }

        public void ShowLogClick()
        {
            OnShowLogClick();
        }

        public void ChooseLogClick(int logIndex)
        {
            OnChooseLogClick(logIndex);
        }

        public void SaveToFileClick()
        {
            OnSaveToFileClick();
        }

        public ILogger getLoggerToFile()
        {
            return new MockLogger();
        }

        public ILogger getHtmlLogger()
        {
            return new MockLogger();
        }
    }
}
